using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Runtime.Serialization;
using System.Web.Script.Serialization;
using System.Xml.Serialization;
using XCode;
using XCode.Configuration;
using XCode.DataAccessLayer;

namespace Windows_DDNS.Model
{
    /// <summary>动态绑定记录表</summary>
    [Serializable]
    [DataObject]
    [Description("动态绑定记录表")]
    [BindIndex("IU_Data_UpDateDDNS_UpdateTime", true, "UpdateTime")]
    [BindTable("Data_UpDateDDNS", Description = "动态绑定记录表", ConnName = "SQLServer_WindowsDDNS", DbType = DatabaseType.None)]
    public partial class Data_UpDateDDNS
    {
        #region 属性
        private String _UpdateddnsID;
        /// <summary>更新记录ID（主键）</summary>
        [DisplayName("更新记录ID")]
        [Description("更新记录ID（主键）")]
        [DataObjectField(false, false, true, 50)]
        [BindColumn("Updateddns_ID", "更新记录ID（主键）", "")]
        public String UpdateddnsID { get => _UpdateddnsID; set { if (OnPropertyChanging("UpdateddnsID", value)) { _UpdateddnsID = value; OnPropertyChanged("UpdateddnsID"); } } }

        private String _DatadomainName;
        /// <summary>域名</summary>
        [DisplayName("域名")]
        [Description("域名")]
        [DataObjectField(false, false, true, 50)]
        [BindColumn("DataDomain_Name", "域名", "")]
        public String DatadomainName { get => _DatadomainName; set { if (OnPropertyChanging("DatadomainName", value)) { _DatadomainName = value; OnPropertyChanged("DatadomainName"); } } }

        private String _DataIp;
        /// <summary>本机IP</summary>
        [DisplayName("本机IP")]
        [Description("本机IP")]
        [DataObjectField(false, false, true, 50)]
        [BindColumn("Data_IP", "本机IP", "")]
        public String DataIp { get => _DataIp; set { if (OnPropertyChanging("DataIp", value)) { _DataIp = value; OnPropertyChanged("DataIp"); } } }

        private String _CreateUser;
        /// <summary>创建者</summary>
        [DisplayName("创建者")]
        [Description("创建者")]
        [DataObjectField(false, false, true, 50)]
        [BindColumn("CreateUser", "创建者", "")]
        public String CreateUser { get => _CreateUser; set { if (OnPropertyChanging("CreateUser", value)) { _CreateUser = value; OnPropertyChanged("CreateUser"); } } }

        private Boolean _IsNormal;
        /// <summary>是否正常可用</summary>
        [DisplayName("是否正常可用")]
        [Description("是否正常可用")]
        [DataObjectField(false, false, false, 0)]
        [BindColumn("IsNormal", "是否正常可用", "")]
        public Boolean IsNormal { get => _IsNormal; set { if (OnPropertyChanging("IsNormal", value)) { _IsNormal = value; OnPropertyChanged("IsNormal"); } } }

        private DateTime _CreateTime;
        /// <summary>创建时间</summary>
        [DisplayName("创建时间")]
        [Description("创建时间")]
        [DataObjectField(false, false, true, 0)]
        [BindColumn("CreateTime", "创建时间", "")]
        public DateTime CreateTime { get => _CreateTime; set { if (OnPropertyChanging("CreateTime", value)) { _CreateTime = value; OnPropertyChanged("CreateTime"); } } }

        private String _CreateIP;
        /// <summary>创建地址</summary>
        [DisplayName("创建地址")]
        [Description("创建地址")]
        [DataObjectField(false, false, true, 50)]
        [BindColumn("CreateIP", "创建地址", "")]
        public String CreateIP { get => _CreateIP; set { if (OnPropertyChanging("CreateIP", value)) { _CreateIP = value; OnPropertyChanged("CreateIP"); } } }

        private String _UpdateUser;
        /// <summary>更新者</summary>
        [DisplayName("更新者")]
        [Description("更新者")]
        [DataObjectField(false, false, true, 50)]
        [BindColumn("UpdateUser", "更新者", "")]
        public String UpdateUser { get => _UpdateUser; set { if (OnPropertyChanging("UpdateUser", value)) { _UpdateUser = value; OnPropertyChanged("UpdateUser"); } } }

        private DateTime _UpdateTime;
        /// <summary>更新时间</summary>
        [DisplayName("更新时间")]
        [Description("更新时间")]
        [DataObjectField(true, false, true, 0)]
        [BindColumn("UpdateTime", "更新时间", "")]
        public DateTime UpdateTime { get => _UpdateTime; set { if (OnPropertyChanging("UpdateTime", value)) { _UpdateTime = value; OnPropertyChanged("UpdateTime"); } } }

        private String _UpdateIP;
        /// <summary>更新地址</summary>
        [DisplayName("更新地址")]
        [Description("更新地址")]
        [DataObjectField(false, false, true, 50)]
        [BindColumn("UpdateIP", "更新地址", "")]
        public String UpdateIP { get => _UpdateIP; set { if (OnPropertyChanging("UpdateIP", value)) { _UpdateIP = value; OnPropertyChanged("UpdateIP"); } } }
        #endregion

        #region 获取/设置 字段值
        /// <summary>获取/设置 字段值</summary>
        /// <param name="name">字段名</param>
        /// <returns></returns>
        public override Object this[String name]
        {
            get
            {
                switch (name)
                {
                    case "UpdateddnsID": return _UpdateddnsID;
                    case "DatadomainName": return _DatadomainName;
                    case "DataIp": return _DataIp;
                    case "CreateUser": return _CreateUser;
                    case "IsNormal": return _IsNormal;
                    case "CreateTime": return _CreateTime;
                    case "CreateIP": return _CreateIP;
                    case "UpdateUser": return _UpdateUser;
                    case "UpdateTime": return _UpdateTime;
                    case "UpdateIP": return _UpdateIP;
                    default: return base[name];
                }
            }
            set
            {
                switch (name)
                {
                    case "UpdateddnsID": _UpdateddnsID = Convert.ToString(value); break;
                    case "DatadomainName": _DatadomainName = Convert.ToString(value); break;
                    case "DataIp": _DataIp = Convert.ToString(value); break;
                    case "CreateUser": _CreateUser = Convert.ToString(value); break;
                    case "IsNormal": _IsNormal = value.ToBoolean(); break;
                    case "CreateTime": _CreateTime = value.ToDateTime(); break;
                    case "CreateIP": _CreateIP = Convert.ToString(value); break;
                    case "UpdateUser": _UpdateUser = Convert.ToString(value); break;
                    case "UpdateTime": _UpdateTime = value.ToDateTime(); break;
                    case "UpdateIP": _UpdateIP = Convert.ToString(value); break;
                    default: base[name] = value; break;
                }
            }
        }
        #endregion

        #region 字段名
        /// <summary>取得动态绑定记录表字段信息的快捷方式</summary>
        public partial class _
        {
            /// <summary>更新记录ID（主键）</summary>
            public static readonly Field UpdateddnsID = FindByName("UpdateddnsID");

            /// <summary>域名</summary>
            public static readonly Field DatadomainName = FindByName("DatadomainName");

            /// <summary>本机IP</summary>
            public static readonly Field DataIp = FindByName("DataIp");

            /// <summary>创建者</summary>
            public static readonly Field CreateUser = FindByName("CreateUser");

            /// <summary>是否正常可用</summary>
            public static readonly Field IsNormal = FindByName("IsNormal");

            /// <summary>创建时间</summary>
            public static readonly Field CreateTime = FindByName("CreateTime");

            /// <summary>创建地址</summary>
            public static readonly Field CreateIP = FindByName("CreateIP");

            /// <summary>更新者</summary>
            public static readonly Field UpdateUser = FindByName("UpdateUser");

            /// <summary>更新时间</summary>
            public static readonly Field UpdateTime = FindByName("UpdateTime");

            /// <summary>更新地址</summary>
            public static readonly Field UpdateIP = FindByName("UpdateIP");

            static Field FindByName(String name) => Meta.Table.FindByName(name);
        }

        /// <summary>取得动态绑定记录表字段名称的快捷方式</summary>
        public partial class __
        {
            /// <summary>更新记录ID（主键）</summary>
            public const String UpdateddnsID = "UpdateddnsID";

            /// <summary>域名</summary>
            public const String DatadomainName = "DatadomainName";

            /// <summary>本机IP</summary>
            public const String DataIp = "DataIp";

            /// <summary>创建者</summary>
            public const String CreateUser = "CreateUser";

            /// <summary>是否正常可用</summary>
            public const String IsNormal = "IsNormal";

            /// <summary>创建时间</summary>
            public const String CreateTime = "CreateTime";

            /// <summary>创建地址</summary>
            public const String CreateIP = "CreateIP";

            /// <summary>更新者</summary>
            public const String UpdateUser = "UpdateUser";

            /// <summary>更新时间</summary>
            public const String UpdateTime = "UpdateTime";

            /// <summary>更新地址</summary>
            public const String UpdateIP = "UpdateIP";
        }
        #endregion
    }
}